﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


namespace NHOMA2_DVLH
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            lblErrorDelete.Visible = false;
        }

        protected void gvDanhSachTuyenXe_RowDeleted(object sender, GridViewDeletedEventArgs e)
        {
            if (e.Exception != null)
            {
                string errorText = "Không thể xóa tuyến xe " + e.Keys[0];
                lblErrorDelete.Visible = true;
                lblErrorDelete.Text = errorText;
                e.ExceptionHandled = true;
            }           
        }
    }
}
